def func(a):
    ans = 1
    for i in range(0, 202200):
        ans *= a
    p = str(ans)
    print(p[0:5])

for i in range(2, 31):
    func(i)